#pragma config(Sensor, in1,    pot_one,        sensorPotentiometer)
#pragma config(Sensor, in2,    left_line,      sensorReflection)
#pragma config(Sensor, in3,    middle_line,    sensorReflection)
#pragma config(Sensor, in4,    right_line,     sensorReflection)
#pragma config(Motor,  port1,           left,          tmotorVex393, openLoop, reversed)
#pragma config(Motor,  port6,           claw,          tmotorVex393, openLoop)
#pragma config(Motor,  port7,           arm,           tmotorVex393, openLoop)
#pragma config(Motor,  port10,          right,         tmotorVex393, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task main()
{
	while(true)
	{
		if(SensorValue[middle_line]>1500)
		{
			motor[right]=80;
			motor[left]=80;
		}
		else if(SensorValue[left_line]>1500)
		{
			motor[left]=-96;
			motor[right]=96;
			wait1Msec(10);
		}
		else if(SensorValue[right_line]>1500)
		{
			motor[left]=96;
			motor[right]=-96;
			wait1Msec(10);
		}
		else
		{
			motor[left]=96;
			motor[right]=-96;
			wait1Msec(10);
		}
	}
}
